"Killcursor" is a utility program designed to run simultaneously with your BASIC or machine language programs. It's purpose is to disable keys which, if
entered, could result in bad data input. The bad data input could be simply the wrong data or, even worse, it could result in the computer locking up.
The problem keys are:
1. cursor up
2. cursor down
3. comma
4. colon
5. home
6. clr
7. commodore keys
8. control keys
The problem situation is entering data using the BASIC INPUT command. When this statement is used in a program, the user sees a question mark, a blank
space, and then the flashing cursor.
If either cursor up or cursor down are used, they are interpreted as characters input. They also move the cursor off the row where the question mark was
placed. Then when the return key is hit to enter the response, the computer enters it into the variable (answer) originally requested, not in response to what
you see on the screen. So in addition to entering garbage cursor characters, you may not be responding to the question the computer is asking.
In many cases this results in the input of a null string (""). If this is written to a data file, when it is later read back the program will crash. Since
there is NEVER any reason to use cursor up or cursor down during BASIC INPUT, disabling the keys protects the user against these errors of input.
If a colon or comma are entered, they are interpreted as commands rather than characters and result in truncating (chopping off) anything that follows the
colon or comma. This is useful if the requested input is sometheing like INPUT A$,B$. In this case it wants two inputs separated by commas. However 99% of the
time only one input is requested at a time and the comma simply is a problem waiting to happen.
HOW THE PROGRAM WORKS:
From Direct Mode:
LOAD "KILLCURSOR",8,1
The program loads at 49152 decimal (outside of BASIC) and is written entirely in Machine language for speed. The program is started by a SYS49152. If in
direct mode you should then enter NEW to reset the BASIC pointers. This is not necesary if the program is loaded from another program which then uses the
SYS49152 from program mode.
EG. 10 IF PEEK828=0THENPOKE828,1:LOAD "KILLCURSOR",8,1
20 SYS49152
30 REM REMAINDER OF YOUR BASIC PROGRAM
IF UNABLE TO MODIFY A PROGRAM (EG. PROTECTED) THEN MAKE A BOOT PROGRAM.
10 IFA=0THENA=1:LOAD"KILLCURSOR",8,1
20 SYS49152:CLR:LOAD"PROGRAM NAME",8,1
30 REM SAVE THIS UNDER A UNIQUE NAME (EG. BOOT)
The program copies the 8K BASIC and the 8K Kernal operating systems to their respective underlying RAM areas at the same addresses. (Since one cannot
change the values in the ROMS, it is necessary to modify copies of them.) It then inserts the number 255 ($FF) into the keyboard matrix decode table of the
keys to be disabled. This number represents the value of "NO KEY PRESSED". It then places 53 in location 1 which tells the computer to look at the ram copies
instead of the ROM. The last instruction RTS (return from subroutine) returns control to BASIC.
The program takes about 0.5 seconds to run. After it has been run one can instantly switch back and forth from the ROM or RAM operating systems.
Direct mode: Run/Stop and Restore resets to ROM
POKE1,53 tells the computer to look at the RAM system
Program mode: POKE1,55 RESETS TO ROM
POKE1,53 RESETS TO RAM
The program source code is included here. Anyone wanting a copy is welcome. It can't be copied with a load and save command. Filcop, a Disk copier, or a